<script setup lang="ts">
import { ref } from 'vue'
const value1 = ref([])
const orders = ref([
  {
    value: '选项1',
    label: '黄金糕',
    id:1,
  },
  {
    value: '选项2',
    label: '双皮奶',
    id: 2,
  },
  {
    value: '选项3',
    label: '蚵仔煎',
    id: 3,
  },
  {
    value: '选项4',
    label: '龙须面',
    disabled: true,
    id: 4,
  },
  {
    value: '选项5',
    label: '龙须面',
    id: 5,
  }
])
</script>

<template>
  <div>
    <el-select style="width: 200px"  size="small" v-model="value" placeholder="请选择" >
      <el-option
        v-for="item in orders"
        :key="item.value"
        :label="item.label"
        :value="item.value"
        :disabled="item.disabled"
      />
    </el-select>
  </div>
  <div>
    <el-select multiple
               placeholder="请点菜"
               style="width: 240px"
               v-model="value1"
               vaule-key="id"
    >
      <el-option
        v-for="item in orders"
        :key="item.id"
        :label="item.label"
        :value="item.value"
        :disabled="item.disabled"
      />
    </el-select>
  </div>
</template>

